package com.scud.system.mapper;

import com.scud.model.system.dto.PermissionDto;
import com.scud.model.system.pojo.Permission;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author vermouth
 */
@Mapper
public interface PermissionMapper {
    //根据用户ID查询权限数据
    List<Permission> selectByUserId(Long id);

    List<Permission> getAll();

    PermissionDto getByComponent(String component);

    void add(PermissionDto permissionDto);

    PermissionDto getByParentId(Integer parentId);

    void update(PermissionDto permissionDto);

    void delete(Long id);
}
